package text1;

import javax.annotation.processing.Filer;
import javax.management.remote.rmi._RMIConnection_Stub;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class ReaderDome {
    public static void main(String[] args) {

        text();
    }

    private static void text() {
        String str = "D:\\Path\\新建文件夹 (7)\\13.txt";
        try (
                Reader reader = new FileReader(str);
        ){
            char[] chars = new char[1024];
            int i;
            while ((i = reader.read(chars)) != -1){
                String s = new String(chars, 0, i);
                System.out.println(s);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
